import axios from '@/request/http'

import { commonOutDTO, pageCommonInputDTO, pageCommonOutDTO } from '@/api/common.d'
import {
  CreateSxjdbbInputDTO,
  ShthbbCreateInputDTO,
  AjtgjdQueryParam,
  AjtgjdQueryResult,
  AjtgbbCreateInputDTO,
  JdbbQueryParam,
  JdbgQueryResult,
  ThhjjdbbCreateInputDTO,
  ThyyjdbbCreateInputDTO,
  JdbbDeleteInputDTO,
  JdbblbQueryParam,
  JdbblbQueryResult,
  GdbbReleaseInputDTO,
  GdbbRecallInputDTO,
  JdbgCreateOutputDTO,
  JdbgDeleteInputDTO,
  JdbglbQueryParam,
  JdbglbQueryResult,
  JdbbDownloadInputDTO,
  GdsxjdbmQueryParam,
  GdsxjdbmQueryResult,
  GdsxjdjcgQueryParam,
  GdsxjdjcgQueryResult,
  GdzljdshthhjQueryParam,
  GdzljdshthhjQueryResult,
  GdzljdshthyyQueryParam,
  GdzlshthyyQueryResult,
  GdsxjddwQueryParam,
  GdsxjddwQueryResult,
  DownloadJdbbDwQueryResult,
  JdbbxzlxQueryParam,
  JdbbxzlxQueryResult,
} from '@/api/gdjd-dto'

export default class gdjdService {
  /**
   * 生成时效监督报表
   */
  static createSxjdbb(data: CreateSxjdbbInputDTO): Promise<commonOutDTO<boolean>> {
    return axios.post('/api/gdjd/createSxjdbb', data)
  }
  /**
   * 生成审核退回报表
   */
  static createShthbb(data: ShthbbCreateInputDTO): Promise<commonOutDTO<boolean>> {
    return axios.post('/api/gdjd/createShthbb', data)
  }
  /**
   * 查询案卷退改监督
   */
  static queryAjtgjd(data: AjtgjdQueryParam): Promise<commonOutDTO<AjtgjdQueryResult[]>> {
    return axios.post('/api/gdjd/queryAjtgjd', data)
  }
  /**
   * 生成案卷退改报表
   */
  static createAjtgbb(data: AjtgbbCreateInputDTO): Promise<commonOutDTO<boolean>> {
    return axios.post('/api/gdjd/createAjtgbb', data)
  }
  /**
   * 查询监督报告
   */
  static queryJdbg(
    data: pageCommonInputDTO<JdbbQueryParam[]>,
  ): Promise<commonOutDTO<pageCommonOutDTO<JdbgQueryResult[]>>> {
    return axios.post('/api/gdjd/queryJdbg', data)
  }
  /**
   * 生成退回环节监督报表
   */
  static createThhjjdbb(data: ThhjjdbbCreateInputDTO): Promise<commonOutDTO<boolean>> {
    return axios.post('/api/gdjd/createThhjjdbb', data)
  }
  /**
   * 生成退回原因监督报表
   */
  static createThyyjdbb(data: ThyyjdbbCreateInputDTO): Promise<commonOutDTO<boolean>> {
    return axios.post('/api/gdjd/createThyyjdbb', data)
  }
  /**
   * 删除监督报表
   */
  static deleteJdbb(data: JdbbDeleteInputDTO): Promise<commonOutDTO<boolean>> {
    return axios.post('/api/gdjd/deleteJdbb', data)
  }
  /**
   * 查询监督报表列表
   */
  static queryJdbblb(
    data: pageCommonInputDTO<JdbblbQueryParam>,
  ): Promise<commonOutDTO<pageCommonOutDTO<any>>> {
    return axios.post('/api/gdjd/queryJdbblb', data)
  }
  /**
   * 发布归档报表
   */
  static releaseGdbb(data: GdbbReleaseInputDTO): Promise<commonOutDTO<boolean>> {
    return axios.post('/api/gdjd/releaseGdbb', data)
  }
  /**
   * 撤销报表发布
   */
  static recallGdbb(data: GdbbRecallInputDTO): Promise<commonOutDTO<boolean>> {
    return axios.post('/api/gdjd/recallGdbb', data)
  }
  /**
   * 生成监督报告
   */
  static createJdbg(data: any): Promise<commonOutDTO<JdbgCreateOutputDTO>> {
    return axios.post('/api/gdjd/createJdbg', data)
  }
  /**
   * 删除监督报告
   */
  static deleteJdbg(data: JdbgDeleteInputDTO): Promise<commonOutDTO<boolean>> {
    return axios.post('/api/gdjd/deleteJdbg', data)
  }
  /**
   * 获取监督报告列表
   */
  static queryJdbglb(
    data: JdbglbQueryParam,
  ): Promise<commonOutDTO<pageCommonOutDTO<JdbglbQueryResult[]>>> {
    return axios.post('/api/gdjd/queryJdbglb', data)
  }
  /**
   * 下载监督报表
   */
  static downloadJdbb(data: JdbbDownloadInputDTO): Promise<commonOutDTO<object>> {
    return axios.post('/api/gdjd/downloadJdbb', data, { responseType: 'blob' })
  }
  /**
   * 查询归档时效监督部门
   * GdsxjdbmQueryParam
   */
  static queryGdsxjdbm(data: any): Promise<commonOutDTO<GdsxjdbmQueryResult[]>> {
    return axios.post('/api/gdjd/queryGdsxjdbm', data)
  }
  /**
   * 查询归档时效监督-检察官
   */
  static queryGdsxjdjcg(data: GdsxjdjcgQueryParam): Promise<commonOutDTO<GdsxjdjcgQueryResult[]>> {
    return axios.post('/api/gdjd/queryGdsxjdjcg', data)
  }
  /**
   * 查询归档质量审核退回-环节
   */
  static queryGdzljdshthhj(
    data: GdzljdshthhjQueryParam,
  ): Promise<commonOutDTO<GdzljdshthhjQueryResult[]>> {
    return axios.post('/api/gdjd/queryGdzljdshthhj', data)
  }
  /**
   * 查询归档质量审核退回-原因
   */
  static queryGdzlshthyy(
    data: GdzljdshthyyQueryParam,
  ): Promise<commonOutDTO<GdzlshthyyQueryResult[]>> {
    return axios.post('/api/gdjd/queryGdzlshthyy', data)
  }
  /**
   * 查询归档时效监督单位
   */
  static queryGdsxjddw(data: GdsxjddwQueryParam): Promise<commonOutDTO<GdsxjddwQueryResult[]>> {
    return axios.post('/api/gdjd/queryGdsxjddw', data)
  }
  /**
   * 获取下载监督报表单位树
   */
  static queryDownloadJdbbDws(): Promise<commonOutDTO<DownloadJdbbDwQueryResult[]>> {
    return axios.post('/api/gdjd/queryDownloadJdbbDws', {})
  }
  /**
   * 获取监督报表下载类型列表
   */
  static queryJdbbxzlx(data: JdbbxzlxQueryParam): Promise<commonOutDTO<JdbbxzlxQueryResult[]>> {
    return axios.post('/api/gdjd/queryJdbbxzlx', data)
  }
}
